package com.hk.demo.player;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import com.hk.demo.player.grid.VideoPagerPlayerActivity;
import com.hk.demo.player.listpreview.PlayerListActivity;
import com.hk.demo.player.preview.PlayerActivity;
import com.hk.demo.player.test.TestActivity;

/**
 * @author: zhoug
 * @since: 2025-08-07
 */
public class MainActivity extends MyBaseActivity {
    private Button mBtnPlay;
    private Button mBtnPlayList;
    private Button mBtnPlayGrid;
    private Button mBtnTest;

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_main;
    }

    @Override
    protected void findViews() {

        mBtnPlay = findViewById(R.id.btn_play);
        mBtnPlayList = findViewById(R.id.btn_play_list);
        mBtnPlayGrid = findViewById(R.id.btn_play_grid);
        mBtnTest = findViewById(R.id.btn_test);
    }

    @Override
    protected void onCreate1(Bundle savedInstanceState) {

        mBtnPlay.setOnClickListener(v -> {
            Intent intent = new Intent(this, PlayerActivity.class);
            startActivity(intent);
        });

        mBtnPlayList.setOnClickListener(v -> {
            Intent intent = new Intent(this, PlayerListActivity.class);
            startActivity(intent);
        });

        mBtnPlayGrid.setOnClickListener(v->{
            Intent intent = new Intent(this, VideoPagerPlayerActivity.class);
            startActivity(intent);
        });

        mBtnTest.setOnClickListener(v->{
            Intent intent = new Intent(this, TestActivity.class);
            startActivity(intent);
        });


    }
}
